<h2>房子列表</h2>

<div class="actions">
  <span><%= link "新增房子", to: item_path(@conn, :new) %></span>
</div>

<%= for item <- @items do %>
  <ul class="item">
    <li>
      <%= item.name %>
    </li>

    <li>
      <%= item.address %>
    </li>

    <li>
      <strong>面积:</strong>
      <%= item.area %>
    </li>

    <li>
      <strong>价格(w):</strong>
      <%= item.price %> + <%= item.fee %>
    </li>

    <li>
      <span><%= link "详情", to: item_path(@conn, :show, item), class: "btn btn-default" %></span>
      <span><%= link "编辑", to: item_path(@conn, :edit, item), class: "btn btn-default" %></span>
      <span><%= link "照片", to: item_photo_path(@conn, :index, item), class: "btn btn-default" %></span>

      <span><%= link "删除", to: item_path(@conn, :delete, item), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger" %></span>
    </li>
  </ul>
<% end %>

